



TARGET = iotv30_app 


#CC  = riscv64-unknown-linux-gnu-gcc  
CC  = arm-linux-gnueabi-gcc  

CFLAGS  := -Wall -g 

#LIBS  =  -lm -lpthread 


#编译目录
SUBDIRS = iotv30_com \
          iotv30 iotv30_usr nanopb nanopb/pb_common \
          gw_ktj_api utility tcp dev_sensor ota update\
          obj


INC = -I../iotv30 -I../iotv30_com -I../iotv30_usr -I../nanopb -I../nanopb/pb_common -I../dev_sensor  -I../gw_ktj_api -I../utility  -I../tcp \
       -I../ota -I../update  # -I../lib/curl/riscv/lib    -I../lib/curl/include  -I../lib/curl/riscv/lib -I../lib/openssl/include  -I../lib/curl/openssl/lib




#----------------------f133------------------
#SSL_INC := ../lib/openssl
#CURL_INC := ../lib/curl/include

#CURL_LD_PATH := ../lib/curl/riscv/lib
#SSL_LD_PATH := ../lib/openssl/riscv

#----------------------t113------------------
#/home/ubuntu/t0/prj/hw/iotv40-prj/iotv40/lib/openssl/include/openssl
#lib/openssl/include/openssl/aes.h
SSL_INC := ../lib/openssl
SSL_LD_PATH := ../lib/openssl/arm/lib

CURL_INC := ../lib/curl/include
CURL_LD_PATH := ../lib/curl/arm/lib

#----------------------t113------------------

#ZLIB_LIB_PATH_ROOT=/home/ubuntu/t0/my_lib/zlib-1.2.13-armA7
ZLIB_LIB_PATH_ROOT=../lib/zlib
ZLIB_INC=$(ZLIB_LIB_PATH_ROOT)/include/
ZLIB_LD_PATH=$(ZLIB_LIB_PATH_ROOT)/lib



CFLAGS += $(INC)
CFLAGS += -I${SSL_INC}
CFLAGS += -I${CURL_INC}
CFLAGS += -I${ZLIB_INC}

#CFLAGS = -Wall -std=gnu99  -g 
CFLAGS += -std=gnu99  
CFLAGS += -DPB_FIELD_16BIT=65535


LDFLAGS =  -lpthread -lm
LDFLAGS += -ldl -lcurl -lssl -lcrypto -lz -L${CURL_LD_PATH} -L${SSL_LD_PATH} -L${ZLIB_LD_PATH} 
#LDFLAGS += -lm   -lpthread  -lz -lpng -lfreetype


OBJS_DIR = obj 
BIN_DIR  = bin 


RM_FILE = obj/*.o


export  TARGET CC  SUBDIRS OBJS_DIR BIN_DIR  RM_FILE  LDFLAGS CFLAGS  LIBS


gcc_version=${(4.4)}






